(function( $ ){

    var methods = {
		init : function(options) {
			$(this).keyup(function(event) {
				var regExp = new RegExp($(this).attr('patron'),'g');
				var value = $(this).val();
				value = value.match(regExp);
				if(value!=undefined && value!=null && value[0].trim()=='' && $(this).attr('default')){
					value = $(this).attr('default');
				}
				$(this).val(value[0].trim());
				
			});
			
		}
	};
    
    $.fn.input_prevent = function(method){
    	// Method calling logic
        if ( methods[method] ) {
          return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
        } else if ( typeof method === 'object' || ! method ) {
          return methods.init.apply( this, arguments );
        } else {
          $.error( 'Method ' +  method + ' does not exist on disable' );
        }
    };
})( jQuery );

